package com.taldh.design.patterns.factories.simple;

/**
 * date: 2020/5/24
 *
 * @author 袁小黑
 * @version 1.0.0
 */

public class App {

//    public static void main(String[] args) {
//        WeaponFactory factory = new WeaponFactory();
//        for (int i = 0; i < 10; i++) {
//            WeaponType value = WeaponType.values()[(int) (Math.random() * 4)];
//            System.out.println(factory.getWeapon(value));
//        }
//    }


    /**
     * Program entry point.
     *
     * @param args command line args
     */
    public static void main(String[] args) {
        WeaponFactory factory = new WeaponFactory();
        for (int i = 0; i < 10; i++) {
            WeaponType value = WeaponType.values()[(int) (Math.random() * 4)];
            System.out.println(factory.getWeapon(value));
        }
    }

}
